package com.shiguiwu.springmybatis.designpattern.visitor.impl;

import com.shiguiwu.springmybatis.designpattern.visitor.User;
import com.shiguiwu.springmybatis.designpattern.visitor.Visitor;

/**
 * @description: 学生类
 * @author: stone
 * @date: Created by 2021/10/29 16:30
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.visitor.impl
 */
public class Student extends User {



    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);

    }

    public int ranking() {
        return (int) (Math.random() * 100);
    }
}
